﻿using Domain.Process_Procedures;
using Domain.QualityInspection_Modelling;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Infratructure.Interface
{
    public interface IRepository<T>
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="t">参数</param>
        /// <returns>影响行数</returns>
        Task<int> AddAsync(T t);
        /// <summary>
        /// 批量添加
        /// </summary>
        /// <param name="T"></param>
        /// <returns></returns>
        Task<int> CreateRangeAsync(List<T> t);
        /// <summary>
        ///修改
        /// </summary>
        /// <param name="t">参数</param>
        /// <returns>影响行数</returns>
        Task<int> UpdateAsync(T t);
        /// <summary>
        /// 批量修改实体集合
        /// </summary>
        /// <param name="entities">实体集合</param>
        /// <returns>受影响行数</returns>
        Task<int> UpdateRangeAsync(List<T> t);
        /// <summary>
        /// 获取参数
        /// </summary>
        /// <returns>数据</returns>

        IQueryable<T> GetAll();
        /// <summary>
        /// 单行数据
        /// </summary>
        /// <param name="Id">主键</param>
        /// <returns>对象</returns>
        Task<T> GetValue(long Id);
    }


     
}
